package com.itheima.dao;

import com.itheima.pojo.User;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

/**
 * @author Xiao
 * @date 2021/8/30
 */
public interface UserMapper {
    //注解开发
    @Select("select * from tb_user where username = #{username} and password = #{password}")
    User select(@Param("username") String username, @Param("password") String password);

    @Select("select * from tb_user where username = #{username}")
    User selectByUsername(@Param("username") String username);

    //mapper代理
    void add(User user);
}
